package models;

import com.et.ar.ActiveRecordBase;
import com.et.ar.annotations.BelongsTo;
import com.et.ar.annotations.Column;
import com.et.ar.annotations.Id;
import com.et.ar.annotations.Table;
import com.et.ar.annotations.Unique;

import java.sql.*;

//成交记录表
@Table(name="cjdata")
public class Cjdata extends ActiveRecordBase{
	@Id private Integer id;
	@Column private Integer gdid;
	@Column private Integer fid;
	@Column private String address;
	@Column private Float area;
	@Column private Float price;
	@Column private String layer;
	@Column private Integer ts;
	@Column private String cjfs;
	@Column private Integer itype;
	@Column private Timestamp createdate;


	//	@BelongsTo(foreignKey="demoId")
	//	private Demo demo;

	//	public Demo getDemo() {
	//		return demo;
	//	}
	//	public void setDemo(Demo demo) {
	//		this.demo = demo;
	//	}

	//	public int getChildCount() throws Exception {
	//		return (int)count(Cjdata.class, "parentId=?", new Object[]{id});
	//	}
	//	public String findChildIds() throws Exception {
	//		String s = "";
	//		List<Integer> ids = new ArrayList<Integer>();
	//		ids.add(id);
	//		while(!ids.isEmpty()){
	//			int id = ids.remove(0);
	//			s += id + ",";
	//			for(Cjdata item: Cjdata.findAll(Cjdata.class, "parentId=?", new Object[]{id})){
	//				ids.add(item.getId());
	//			}
	//		}
	//		if (!s.equals("")){
	//			s = s.substring(0, s.length() - 1);
	//		}
	//		return s;
	//	}
	public void setId(Integer id){
		this.id=id;
	}
	public Integer getId(){
		return id;
	}

	public void setGdid(Integer gdid){
		this.gdid=gdid;
	}
	public Integer getGdid(){
		return gdid;
	}

	public void setFid(Integer fid){
		this.fid=fid;
	}
	public Integer getFid(){
		return fid;
	}

	public void setAddress(String address){
		this.address=address;
	}
	public String getAddress(){
		return address;
	}

	public void setArea(Float area){
		this.area=area;
	}
	public Float getArea(){
		return area;
	}

	public void setPrice(Float price){
		this.price=price;
	}
	public Float getPrice(){
		return price;
	}

	public void setLayer(String layer){
		this.layer=layer;
	}
	public String getLayer(){
		return layer;
	}

	public void setTs(Integer ts){
		this.ts=ts;
	}
	public Integer getTs(){
		return ts;
	}

	public void setCjfs(String cjfs){
		this.cjfs=cjfs;
	}
	public String getCjfs(){
		return cjfs;
	}

	public void setItype(Integer itype){
		this.itype=itype;
	}
	public Integer getItype(){
		return itype;
	}

	public void setCreatedate(Timestamp createdate){
		this.createdate=createdate;
	}
	public Timestamp getCreatedate(){
		return createdate;
	}

}

